package com.xyoto.community.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ClassName:   问答Dto
 * Author:      挽风
 * Date:        2020
 * Copyright:   2020 by 挽风1.0版本
 * Description:
 **/

@Data
@ApiModel("QuestionDto问答传输Dto")
public class SaveQuestionDTO {

    @ApiModelProperty("话题id")
    @DecimalMin(value = "1", message = "话题id必须大于等于1")
    @NotNull(message = "话题id不能为空")
    private Integer topicId;

    @ApiModelProperty("问答内容")
    @NotBlank(message = "问答内容不能为空")
    private String content;
}
